
import storage from '@/utils/storage'
export const getters = {
  getSystemInfo (state) {
    if (state.systemInfo) {
      return state.systemInfo
    } else if (storage.get('SYSTEM_INFO')) {
      return JSON.parse(storage.get('SYSTEM_INFO'))
    }
    return {}
  },
  getUsers (state) {
    if (state.users) {
      return state.users
    }
    return []
  },
  userId: state => state.userId,
  roles: state => state.roles,
  permissions: state => state.permissions,
  userInfo: state => state.userInfo,
  user: state => state.user
}
